<?php
/* @var $this ArticleController */
/* @var $dataProvider CActiveDataProvider */
?>
<div class="s_result"><h1><?php echo $this->_h1;?></h1>&nbsp;<span>Всего <?php echo $count?> новостей(-и)</span></div>
<div class="stats">
<?php foreach ($articles as $item): ?>
<div class="st_story">
<?php $Params = array( 'zc'=>1,/* зоом с вырезанием */); ?>
<?php if (count($item->newsPhotoses)) { 
	$image = $item->newsPhotoses[0];
	$src = News::getFolder($image->path, false).$image->path;
	$srcSmall = ImageResizer::resizeImage($src, array('w'=>236, 'h'=>168), 0, $Params);
?>
<div class="image"><?php echo CHtml::image($srcSmall?$srcSmall:$src)?></div>
<?php } ?>
<div class="title"><a href="<?php echo $this->createUrl('news/view', array('id'=>$item->id))?>"><?php echo $item->caption; ?></a></div>
<span class="text">
<?php echo $item->anons_text; ?>
</span>
<div class="clr"></div>
</div>
<?php endforeach; ?>


<?php $this->widget('CLinkPager', array(
    'pages' => $pages,
    'header' => '',
    'prevPageLabel' => 'Назад',
    'nextPageLabel' => 'Вперед',
	'firstPageLabel'=>'Начало',
	'lastPageLabel'=>'Конец',
    'maxButtonCount' => 5,
    //'cssFile' => Yii::app()->theme->baseUrl . '/css/pager.css',
    'htmlOptions' => array(
        'class' => 'pagination'
    ),     
)); ?>
</div>